package priv.yiyuan.example.design.visitor;

/**
 * 元素实现类：网络配置
 *
 * @author YiYuan
 * @data 2025/8/4
 * @apoNote
 */
public class NetworkConfig implements ConfigurationElement {

    private String ipAddress;

    private int port;

    public NetworkConfig(String ipAddress, int port) {
        this.ipAddress = ipAddress;
        this.port = port;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public int getPort() {
        return port;
    }

    @Override
    public void accept(ConfigurationVisitor visitor) {
        visitor.visit(this);
    }
}
